@charset "utf-8";

// theme start -----------------------------------------------------------------
// theme-1
.theme-1 {
    // layout wrapper start
    &.layout-wrapper {
        background: linear-gradient(
            to right,
            rgb(58, 97, 134),
            rgb(137, 37, 62),
        );
    }
    // layout wrapper end
}
// theme end -------------------------------------------------------------------

// * {
//     box-sizing: border-box;
//     user-select: none;
// }

:root,
.layout-wrapper {
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    font: 14px/1.5 "微软雅黑" "Roboto", "Helvetica", "Arial", sans-serif;
    color: #fff;
    overflow-x: hidden;
}

.main-wrapper {
    width: 1400px;
    margin: 30px auto;

    * {
        box-sizing: border-box;
    }
}

// nav start -------------------------------------------------------------------
.nav-header {
    display: flex;
    height: 40px;
    padding: 0 15px;
    background-color: rgba(255, 255, 255, 0.4);

    ul.nav-wrapper {
        display: flex;
        align-items: center;
        white-space:nowrap;

        li.nav-item {
            margin-right: 10px;

            &+li.nav-item-before {
                &::before {
                    content: '>';
                    margin-right: 10px;
                    font-weight: 700;
                }
            }
        }
    }

    ul.nav-center {
        width: 80%;

        li.nav-item {
            max-width: 300px;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }
    }

    ul.nav-right {
        margin-left: auto;
    }

    .add-btn {
        position: relative;
        width: 40px;
        height: 40px;
        line-height: 40px;
        border-radius: 50%;
        text-align: center;
        background-color: rgba(0, 0, 0, 0.2);
        cursor: pointer;

        .add-wrapper {
            display: none;
            position: absolute;
            top: 40px;
            right: -26px;
            padding: 10px 0;
            background-color: rgba(0, 0, 0, 0.2);

            p {
                padding: 5px 15px;

                &:hover {
                    background-color: rgba(0, 0, 0, 0.4);
                }
            }
        }

        &:hover {
            .add-wrapper {
                display: block;
            }
        }
    }
}
// nav end   -------------------------------------------------------------------

// file start ------------------------------------------------------------------

.file(@type, @icon-size, @name-size: 14px, @time-size: 12px,) {
    .@{type}-wrapper {
        width: 140px;
        padding: 8px 4px 10px;
        text-align: center;
        border-radius: 5px;
        transition: background-color 0.3s ease;

        .@{type}-icon {
            width: 140px;
            height: 87px;
            line-height: 87px;
            text-align: center;
            user-select: none;

            .iconfont {
                font-size: @icon-size;
            }
        }

        p.img {
            display: flex;
            align-items: center;
            width: 120px;
            height: 100px;
            margin: 0 auto;

            img {
                max-width: 100%;
                max-height: 100%;
                border-radius: 5px;
                margin: 0 auto;
            }
        }

        .@{type}-name {
            width: 100%;
            max-width: 100%;
            height: 42px;
            max-height: 42px;
            line-height: 1.5;
            text-align: center;
            font-size: @name-size;

            // 字体两行益处
            overflow: hidden;
            text-overflow: ellipsis;
            display:-webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .@{type}-time {
            font-size: 12px;
            white-space: nowrap;
        }
        .@{type}-size {
            font-size: 12px;
            white-space: nowrap;
        }

        &:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
    }
}
.file-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 15px;

    .file(
        @type: folder,
        @icon-size: 80px,
        @name-size: 14px,
        @time-size: 12px,
    );

    .file(
        @type: music,
        @icon-size: 60px,
        @name-size: 14px,
        @time-size: 12px,
    );

    .file(
        @type: video,
        @icon-size: 60px,
        @name-size: 14px,
        @time-size: 12px,
    );

    .file(
        @type: img,
        @icon-size: 60px,
        @name-size: 14px,
        @time-size: 12px,
    );

    .file(
        @type: code,
        @icon-size: 60px,
        @name-size: 14px,
        @time-size: 12px,
    );

    .file(
        @type: zip,
        @icon-size: 60px,
        @name-size: 14px,
        @time-size: 12px,
    );

    .file(
        @type: other,
        @icon-size: 60px,
        @name-size: 14px,
        @time-size: 12px,
    );

    .image-info-wrapper {
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    // music start
    .music-info-wrapper {
        width: 100%;
        margin: 0 auto;
        max-height: 787.5px;

        .aplayer {
            margin: 0;

            .aplayer-body {
                .aplayer-info {
                    .aplayer-music {
                        color: rgba(0, 0, 0, 0.8);
                    }
                }
            }
        }
    }
    // music end

    // video start
    .video-info-wrapper {
        width: 100%;
        margin: 0 auto;
        max-height: 787.5px;
    }
    // video end

    .view-info-wrapper {
        width: 100%;
    }
    .zip-info-wrapper {}
}
// file end   ------------------------------------------------------------------
